//
//  CollectionsViewController.m
//  我的小汽车
//
//  Created by 邹壮壮29 on 15-1-13.
//  Copyright (c) 2015年 蓝欧科技. All rights reserved.
//

#import "CollectionsViewController.h"
#import "SCNavTabBarController.h"
#import "CarNewsCollectionViewController.h"
#import "MainPageCollectionViewController.h"
#import "CarActivityCollectionViewController.h"
@interface CollectionsViewController ()

@end

@implementation CollectionsViewController
- (void)dealloc
{
    
    [super dealloc];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    CarNewsCollectionViewController *carNewsViewController = [[CarNewsCollectionViewController alloc] init];
    carNewsViewController.title = @"资讯";
    carNewsViewController.view.backgroundColor = [UIColor brownColor];
    UINavigationController *carNews = [[UINavigationController alloc]initWithRootViewController:carNewsViewController];
    
    MainPageCollectionViewController *mainPageViewController = [[MainPageCollectionViewController alloc] init];
    mainPageViewController.title = @"广告";
    mainPageViewController.view.backgroundColor = [UIColor purpleColor];
    UINavigationController *mainPage = [[UINavigationController alloc]initWithRootViewController:mainPageViewController];
    
    CarActivityCollectionViewController *carActivityViewController = [[CarActivityCollectionViewController alloc] init];
    carActivityViewController.title = @"活动";
    carActivityViewController.view.backgroundColor = [UIColor orangeColor];
    UINavigationController *carActivity = [[UINavigationController alloc]initWithRootViewController:carActivityViewController];
    SCNavTabBarController *navTabBarController = [[SCNavTabBarController alloc] init];
    navTabBarController.subViewControllers = @[carNews, mainPage, carActivity];
    navTabBarController.showArrowButton = YES;
    [navTabBarController addParentController:self];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
